package com.atguigu.gmall.search.vo;

import com.atguigu.gmall.search.Goods;
import jdk.internal.util.xml.impl.Attrs;
import lombok.Data;

import java.util.List;

//检索的响应结果
@Data
public class SearchRespVo {
    //1封装了检索的所有参数
    private SearchParamVo searchParam;
    //2品牌搜索的面包屑
    private String trademarkParam;
    //3平台属性面包屑
    private List<Props> propsParamList;
    //4品牌列表
    private List<Trademark> trademarkList;
    //5属性列表
    private List<Attrs> attrsList;
    //6url参数
    private String urlParam;
    //7排序
    private OrderMap orderMap;
    //8商品集合 todo 商品数据原来是在MySQL中；需要通过上架操作给es存一份
    private List<Goods> goodsList;
    //9页码
    private Integer pageNo;
    //10总页码
    private Long totalPages;
    @Data
    public static class Props{
        Long attrId;
        String attrName;
        String attrValue;
    }
    //品牌
    @Data
    public static class Trademark{
        Long tmId;
        String tmName;
        String tmLogoUrl;
    }
    @Data
    public static class Attrs{
        String attrName;
        Long attrId;
        List<String> attrValueList;
    }
    @Data
    public static class OrderMap{
        String sort;
        String type;
    }
}
